<template>
  <el-form-item prop="downFontSize" label="下拉框字体大小">
    <el-slider v-model="optionModel.downFontSize" size="small" :min="0" :max="20" :step="1" />
  </el-form-item>
</template>

<script>
export default {
  name: 'DownFontSizeEditor',
  props: {
    designer: Object,
    selectedWidget: Object,
    optionModel: Object
  },
  computed: {
    fontSize: {
      get() {
        return this.optionModel['fontSize']
      },

      set(newValue) {
        //if ((!newValue && (newValue !== 0)) || isNaN(newValue)) {
        if (newValue === undefined || newValue === null || isNaN(newValue)) {
          this.optionModel.fontSize = 0
        } else {
          this.optionModel.fontSize = Number(newValue)
        }
      }
    }
  }
}
</script>

<style scoped></style>
